﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using GalaSoft.MvvmLight;

namespace GrillMaster.Model
{
    public class Animal : ViewModelBase
    {
        private string _name;
        private int _temperature;

        public  Animal(string name, int temperature)
        {
            Name = name;
            Temperature = temperature;
        }

        public string Name
        {
            get
            {
                return _name;
            }

            set
            {
                if (_name == value)
                {
                    return;
                }

                _name = value;
                RaisePropertyChanged("Name");
            }
        }

        public override string ToString()
        {
            return Name + " (" + Temperature + " ºC)";
        }

        public int Temperature
        {
            get
            {
                return _temperature;
            }

            set
            {
                if (_temperature == value)
                {
                    return;
                }

                _temperature = value;
                RaisePropertyChanged("Temperature");
            }
        }            
    }
}
